package com.learn.apis;

import com.learn.resp.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author DJJ_F
 * @version 1.0
 * @date 2025/08/08
 * @description ch13 seata
 */
@FeignClient("seata-account-service")
public interface AccountFeignApi {
    /**
     * 扣减账户余额
     * @param userId
     * @param money
     * @return
     */
    @PostMapping("/account/decrease")
    Result decrease(@RequestParam("userId") Long userId, @RequestParam("money") Long money);
}
